package jcpcotizaciones.vista;

import java.sql.SQLException;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import jcpcotizaciones.Control.*;
import jcpcotizaciones.JCPCOTIZACIONESApp;
import jcpcotizaciones.JCPCOTIZACIONESView;
import jcpcotizaciones.Modelo.*;

public class vistaOrdenPedido extends javax.swing.JFrame {

    DefaultTableModel tablaItemOrden = new DefaultTableModel();
    Buscar itemAorden = new Buscar();

    public vistaOrdenPedido() {
        initComponents();
        parametros();
    }

   @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dialogoOrden = new javax.swing.JDialog();
        Aceptar_eliminar = new javax.swing.JButton();
        jLabel24 = new javax.swing.JLabel();
        Cancelar_Eliminar = new javax.swing.JButton();
        pisoOrdenPedido = new jcMousePanel.jcMousePanel();
        jcMousePanel1 = new jcMousePanel.jcMousePanel();
        jcMousePanel2 = new jcMousePanel.jcMousePanel();
        cb_buscarprovee = new javax.swing.JComboBox();
        tx_buscarprovee = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jcMousePanel3 = new jcMousePanel.jcMousePanel();
        jLabel5 = new javax.swing.JLabel();
        tx_codigoprovee = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        tx_cedulaprovee = new javax.swing.JTextField();
        tx_nombreprovee = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        tx_direccionprovee = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        tx_telefonoprovee = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        tx_emailprovee = new javax.swing.JTextField();
        jcMousePanel4 = new jcMousePanel.jcMousePanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaordenpedido = new javax.swing.JTable(tablaItemOrden);
        tx_fecha = new javax.swing.JTextField();
        tx_numero = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        bt_Guardar = new javax.swing.JButton();
        tx_subtotal = new javax.swing.JTextField();
        tx_iva = new javax.swing.JTextField();
        tx_total = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        bt_agregar = new javax.swing.JButton();
        tx_hora = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        bt_quitarItem = new javax.swing.JButton();

        dialogoOrden.setName("dialogoOrden"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(jcpcotizaciones.JCPCOTIZACIONESApp.class).getContext().getResourceMap(vistaOrdenPedido.class);
        Aceptar_eliminar.setText(resourceMap.getString("Aceptar_eliminar.text")); // NOI18N
        Aceptar_eliminar.setName("Aceptar_eliminar"); // NOI18N
        Aceptar_eliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Aceptar_eliminarActionPerformed(evt);
            }
        });

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        Cancelar_Eliminar.setText(resourceMap.getString("Cancelar_Eliminar.text")); // NOI18N
        Cancelar_Eliminar.setName("Cancelar_Eliminar"); // NOI18N
        Cancelar_Eliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Cancelar_EliminarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout dialogoOrdenLayout = new javax.swing.GroupLayout(dialogoOrden.getContentPane());
        dialogoOrden.getContentPane().setLayout(dialogoOrdenLayout);
        dialogoOrdenLayout.setHorizontalGroup(
            dialogoOrdenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 388, Short.MAX_VALUE)
            .addGroup(dialogoOrdenLayout.createSequentialGroup()
                .addGap(144, 144, 144)
                .addGroup(dialogoOrdenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(dialogoOrdenLayout.createSequentialGroup()
                        .addComponent(Aceptar_eliminar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(Cancelar_Eliminar))
                    .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(47, 47, 47))
        );
        dialogoOrdenLayout.setVerticalGroup(
            dialogoOrdenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogoOrdenLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jLabel24)
                .addGap(33, 33, 33)
                .addGroup(dialogoOrdenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Aceptar_eliminar)
                    .addComponent(Cancelar_Eliminar))
                .addContainerGap(41, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Form"); // NOI18N

        pisoOrdenPedido.setIcon(resourceMap.getIcon("pisoOrdenPedido.icon")); // NOI18N
        pisoOrdenPedido.setName("pisoOrdenPedido"); // NOI18N

        jcMousePanel1.setIcon(resourceMap.getIcon("jcMousePanel1.icon")); // NOI18N
        jcMousePanel1.setName("jcMousePanel1"); // NOI18N

        javax.swing.GroupLayout jcMousePanel1Layout = new javax.swing.GroupLayout(jcMousePanel1);
        jcMousePanel1.setLayout(jcMousePanel1Layout);
        jcMousePanel1Layout.setHorizontalGroup(
            jcMousePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 585, Short.MAX_VALUE)
        );
        jcMousePanel1Layout.setVerticalGroup(
            jcMousePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 41, Short.MAX_VALUE)
        );

        jcMousePanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jcMousePanel2.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jcMousePanel2.border.titleFont"), resourceMap.getColor("jcMousePanel2.border.titleColor"))); // NOI18N
        jcMousePanel2.setIcon(resourceMap.getIcon("jcMousePanel2.icon")); // NOI18N
        jcMousePanel2.setName("jcMousePanel2"); // NOI18N

        cb_buscarprovee.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Código", "Cédula", "Nombre" }));
        cb_buscarprovee.setAutoscrolls(true);
        cb_buscarprovee.setName("cb_buscarprovee"); // NOI18N

        tx_buscarprovee.setText(resourceMap.getString("tx_buscarprovee.text")); // NOI18N
        tx_buscarprovee.setName("tx_buscarprovee"); // NOI18N
        tx_buscarprovee.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tx_buscarproveeActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jcMousePanel2Layout = new javax.swing.GroupLayout(jcMousePanel2);
        jcMousePanel2.setLayout(jcMousePanel2Layout);
        jcMousePanel2Layout.setHorizontalGroup(
            jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jcMousePanel2Layout.createSequentialGroup()
                .addGroup(jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cb_buscarprovee, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jcMousePanel2Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(229, 229, 229))
                    .addGroup(jcMousePanel2Layout.createSequentialGroup()
                        .addComponent(tx_buscarprovee)
                        .addContainerGap())))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jcMousePanel2Layout.createSequentialGroup()
                .addComponent(jButton1)
                .addContainerGap())
        );
        jcMousePanel2Layout.setVerticalGroup(
            jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jcMousePanel2Layout.createSequentialGroup()
                .addGroup(jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cb_buscarprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tx_buscarprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
                .addComponent(jButton1))
        );

        jcMousePanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jcMousePanel3.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jcMousePanel3.border.titleFont"), resourceMap.getColor("jcMousePanel3.border.titleColor"))); // NOI18N
        jcMousePanel3.setIcon(resourceMap.getIcon("jcMousePanel3.icon")); // NOI18N
        jcMousePanel3.setName("jcMousePanel3"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        tx_codigoprovee.setText(resourceMap.getString("tx_codigoprovee.text")); // NOI18N
        tx_codigoprovee.setEnabled(false);
        tx_codigoprovee.setName("tx_codigoprovee"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        tx_cedulaprovee.setText(resourceMap.getString("tx_cedulaprovee.text")); // NOI18N
        tx_cedulaprovee.setEnabled(false);
        tx_cedulaprovee.setName("tx_cedulaprovee"); // NOI18N

        tx_nombreprovee.setText(resourceMap.getString("tx_nombreprovee.text")); // NOI18N
        tx_nombreprovee.setEnabled(false);
        tx_nombreprovee.setName("tx_nombreprovee"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        tx_direccionprovee.setText(resourceMap.getString("tx_direccionprovee.text")); // NOI18N
        tx_direccionprovee.setEnabled(false);
        tx_direccionprovee.setName("tx_direccionprovee"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        tx_telefonoprovee.setText(resourceMap.getString("tx_telefonoprovee.text")); // NOI18N
        tx_telefonoprovee.setEnabled(false);
        tx_telefonoprovee.setName("tx_telefonoprovee"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        tx_emailprovee.setText(resourceMap.getString("tx_emailprovee.text")); // NOI18N
        tx_emailprovee.setEnabled(false);
        tx_emailprovee.setName("tx_emailprovee"); // NOI18N

        javax.swing.GroupLayout jcMousePanel3Layout = new javax.swing.GroupLayout(jcMousePanel3);
        jcMousePanel3.setLayout(jcMousePanel3Layout);
        jcMousePanel3Layout.setHorizontalGroup(
            jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jcMousePanel3Layout.createSequentialGroup()
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jcMousePanel3Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tx_direccionprovee))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jcMousePanel3Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tx_codigoprovee, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tx_cedulaprovee, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tx_telefonoprovee, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tx_emailprovee, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
                    .addComponent(tx_nombreprovee, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE))
                .addContainerGap())
        );
        jcMousePanel3Layout.setVerticalGroup(
            jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jcMousePanel3Layout.createSequentialGroup()
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(tx_codigoprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(tx_cedulaprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tx_nombreprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jcMousePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(tx_direccionprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(tx_emailprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(tx_telefonoprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jcMousePanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jcMousePanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jcMousePanel4.border.titleFont"), resourceMap.getColor("jcMousePanel4.border.titleColor"))); // NOI18N
        jcMousePanel4.setIcon(resourceMap.getIcon("jcMousePanel4.icon")); // NOI18N
        jcMousePanel4.setName("jcMousePanel4"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tablaItemOrden.addColumn("Código Item");
        tablaItemOrden.addColumn("Cant. Pliegos");
        tablaItemOrden.addColumn("Nombre");
        tablaItemOrden.addColumn("Corte");
        tablaItemOrden.addColumn("Vr. Unitario");
        tablaItemOrden.addColumn("Vr. Total");
        tablaordenpedido.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tablaordenpedido.setAutoscrolls(false);
        tablaordenpedido.setName("tablaordenpedido"); // NOI18N
        jScrollPane1.setViewportView(tablaordenpedido);

        javax.swing.GroupLayout jcMousePanel4Layout = new javax.swing.GroupLayout(jcMousePanel4);
        jcMousePanel4.setLayout(jcMousePanel4Layout);
        jcMousePanel4Layout.setHorizontalGroup(
            jcMousePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE)
        );
        jcMousePanel4Layout.setVerticalGroup(
            jcMousePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
        );

        tx_fecha.setFont(resourceMap.getFont("tx_fecha.font")); // NOI18N
        tx_fecha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tx_fecha.setText(resourceMap.getString("tx_fecha.text")); // NOI18N
        tx_fecha.setEnabled(false);
        tx_fecha.setName("tx_fecha"); // NOI18N
        tx_fecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tx_fechaActionPerformed(evt);
            }
        });

        tx_numero.setFont(resourceMap.getFont("tx_numero.font")); // NOI18N
        tx_numero.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tx_numero.setText(resourceMap.getString("tx_numero.text")); // NOI18N
        tx_numero.setEnabled(false);
        tx_numero.setName("tx_numero"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        bt_Guardar.setIcon(resourceMap.getIcon("bt_Guardar.icon")); // NOI18N
        bt_Guardar.setText(resourceMap.getString("bt_Guardar.text")); // NOI18N
        bt_Guardar.setName("bt_Guardar"); // NOI18N
        bt_Guardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_GuardarActionPerformed(evt);
            }
        });

        tx_subtotal.setText(resourceMap.getString("tx_subtotal.text")); // NOI18N
        tx_subtotal.setEnabled(false);
        tx_subtotal.setName("tx_subtotal"); // NOI18N

        tx_iva.setText(resourceMap.getString("tx_iva.text")); // NOI18N
        tx_iva.setEnabled(false);
        tx_iva.setName("tx_iva"); // NOI18N

        tx_total.setText(resourceMap.getString("tx_total.text")); // NOI18N
        tx_total.setEnabled(false);
        tx_total.setName("tx_total"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        bt_agregar.setIcon(resourceMap.getIcon("bt_agregar.icon")); // NOI18N
        bt_agregar.setText(resourceMap.getString("bt_agregar.text")); // NOI18N
        bt_agregar.setName("bt_agregar"); // NOI18N
        bt_agregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_agregarActionPerformed(evt);
            }
        });

        tx_hora.setFont(resourceMap.getFont("tx_hora.font")); // NOI18N
        tx_hora.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tx_hora.setText(resourceMap.getString("tx_hora.text")); // NOI18N
        tx_hora.setEnabled(false);
        tx_hora.setName("tx_hora"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        bt_quitarItem.setText(resourceMap.getString("bt_quitarItem.text")); // NOI18N
        bt_quitarItem.setName("bt_quitarItem"); // NOI18N
        bt_quitarItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_quitarItemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pisoOrdenPedidoLayout = new javax.swing.GroupLayout(pisoOrdenPedido);
        pisoOrdenPedido.setLayout(pisoOrdenPedidoLayout);
        pisoOrdenPedidoLayout.setHorizontalGroup(
            pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 409, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(bt_Guardar)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jButton2))
                        .addComponent(jcMousePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                            .addComponent(bt_agregar)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(bt_quitarItem, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel11)
                                .addComponent(jLabel12)
                                .addComponent(jLabel13))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(tx_total, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(tx_iva, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(tx_subtotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jcMousePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jcMousePanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pisoOrdenPedidoLayout.createSequentialGroup()
                            .addComponent(jcMousePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jLabel3)
                                .addComponent(tx_fecha, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
                                .addComponent(jLabel14)
                                .addComponent(tx_hora))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(tx_numero, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pisoOrdenPedidoLayout.createSequentialGroup()
                                    .addComponent(jLabel4)
                                    .addGap(19, 19, 19))))))
                .addGap(98, 98, 98))
        );
        pisoOrdenPedidoLayout.setVerticalGroup(
            pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jcMousePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jcMousePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tx_fecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tx_hora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tx_numero, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jcMousePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jcMousePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(bt_agregar)
                        .addComponent(bt_quitarItem))
                    .addGroup(pisoOrdenPedidoLayout.createSequentialGroup()
                        .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(tx_subtotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tx_iva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tx_total, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pisoOrdenPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2)
                            .addComponent(bt_Guardar))))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pisoOrdenPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 622, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pisoOrdenPedido, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        buscarProveedor();        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void tx_buscarproveeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tx_buscarproveeActionPerformed
        buscarProveedor();        // TODO add your handling code here:
    }//GEN-LAST:event_tx_buscarproveeActionPerformed

    private void bt_agregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_agregarActionPerformed
        agregarItem();

    }//GEN-LAST:event_bt_agregarActionPerformed

    private void Aceptar_eliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Aceptar_eliminarActionPerformed
        try {
            int x = tablaordenpedido.getSelectedRow();
            String num = tablaItemOrden.getValueAt(x, 0).toString();
            ControlOrden_Item.EliminarItemOrden(num, tx_numero.getText());
            listarItemPedido();

        } catch (SQLException ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        }
        dialogoOrden.setVisible(false);
    }//GEN-LAST:event_Aceptar_eliminarActionPerformed

    private void Cancelar_EliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Cancelar_EliminarActionPerformed
        dialogoOrden.setVisible(false);
}//GEN-LAST:event_Cancelar_EliminarActionPerformed

    private void bt_quitarItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_quitarItemActionPerformed
            dialogoOrden.setSize(350, 150);
            dialogoOrden.setLocation(350, 300);
            dialogoOrden.setVisible(true);
    }//GEN-LAST:event_bt_quitarItemActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

       try {
            if(ControlOrdenDePedido.BuscarOrdenDePedido(tx_numero.getText().trim())!=null){
                ControlOrden_Item.EliminarTodoItem(tx_numero.getText().trim());
                ControlOrdenDePedido.EliminarOrdenDePedido(tx_numero.getText().trim());
            }
            JCPCOTIZACIONESView.frame_ordenPedido.setVisible(false);
            nueva();
        } catch (SQLException ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void tx_fechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tx_fechaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tx_fechaActionPerformed

    private void bt_GuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_GuardarActionPerformed
        guardar();
        nueva();
        JCPCOTIZACIONESView.frame_ordenPedido.setVisible(false);
    }//GEN-LAST:event_bt_GuardarActionPerformed

public void guardar(){ // Guarda todo los cambios efectuados en el formulario de orden de pedido y lo guarda modificando la base de datos.
    try {
        if(ControlOrdenDePedido.BuscarOrdenDePedido(tx_numero.getText())!= null){
            OrdenDePedido o = new OrdenDePedido();
            o.setNumero(tx_numero.getText());
            o.setSubtotal(Double.parseDouble(tx_subtotal.getText()));
            o.setIva(Double.parseDouble(tx_iva.getText()));
            o.setTotal(Double.parseDouble(tx_total.getText()));
            o.setProveedor(ControlProveedor.BuscarProveedor(tx_codigoprovee.getText()));
            o.setUsu(JCPCOTIZACIONESApp.usu);
            ControlOrdenDePedido.ModificarOrdenDePedido(o, tx_numero.getText());
        }
            
        } catch (SQLException ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
        }
}

public void nueva(){
    tx_buscarprovee.setText("");
    tx_cedulaprovee.setText("");
    tx_codigoprovee.setText("");
    tx_direccionprovee.setText("");
    tx_emailprovee.setText("");
    tx_iva.setText("0.0");
    tx_nombreprovee.setText("");
    tx_subtotal.setText("0.0");
    tx_telefonoprovee.setText("");
    tx_total.setText("0.0");
    tablaItemOrden.setNumRows(0);
    parametros();
}

public void agregarItem() {
// primero guarda una orden de pedido en la base de datosd, después hace visible la vista buscar cotización, luego que
// encontra la cotización ir agregando item ya realizados en ésta, para poder hacerle una orden de pedido.

try {
    if (ControlOrdenDePedido.BuscarOrdenDePedido(tx_numero.getText()) == null) {
        crearOrden();
    } else {
        itemAorden.bt_imprimir.setVisible(false);
        itemAorden.bt_agregarproduccion.setVisible(false);
        itemAorden.setVisible(true);
        itemAorden.setNumOrden(tx_numero.getText());
        itemAorden.setFecha(tx_fecha.getText());
        itemAorden.setHora(tx_hora.getText());
        itemAorden.setVop(this);
    }

} catch (SQLException ex) {
    Logger.getLogger(vistaOrdenPedido.class.getName()).log(Level.SEVERE, null, ex);
}
}

public void crearOrden() // guarda una nueva orden de pedido en la base de datos.
{
if (tx_codigoprovee.getText().trim().equals("")){
    JOptionPane.showMessageDialog(null,"Seleccione un Proveedor");
}else{
    try {
        OrdenDePedido o = new OrdenDePedido();
        o.setNumero(tx_numero.getText().trim());
        o.setSubtotal(Double.parseDouble(tx_subtotal.getText()));
        o.setIva(Double.parseDouble(tx_iva.getText()));
        o.setTotal(Double.parseDouble(tx_total.getText()));
        o.setProveedor(ControlProveedor.BuscarProveedor(tx_codigoprovee.getText()));
        o.setUsu(JCPCOTIZACIONESApp.usu);
        ControlOrdenDePedido.agregarOrdenDePedido(o);
        itemAorden.bt_imprimir.setVisible(false);
        itemAorden.bt_agregarproduccion.setVisible(false);
        itemAorden.setVisible(true);
        itemAorden.setNumOrden(tx_numero.getText());
        itemAorden.setFecha(tx_fecha.getText());
        itemAorden.setHora(tx_hora.getText());
        itemAorden.setVop(this);
    } catch (SQLException ex) {
        Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
    } catch (Exception ex) {
        Logger.getLogger(vistaCotizacion.class.getName()).log(Level.SEVERE, null, ex);
    }
}

}

public void parametros() { // Pones algunos de los datos más importantes de una cotización como son: fecha, hora, numero de la
                           //cotización, y no premite que repitan los números de las cotizaciones.
DecimalFormat formateador = new DecimalFormat("0000");
if (ControlOrdenDePedido.proximo() == 0) {
    tx_numero.setText(formateador.format(1));
} else {
    tx_numero.setText("" + formateador.format(ControlOrdenDePedido.proximo()));
}


Date fecha = new Date();
SimpleDateFormat formato = new SimpleDateFormat("dd-MM-yyyy");
String sfecha = formato.format(fecha);
tx_fecha.setText(sfecha);

Date hora = new Date();
SimpleDateFormat formatohora = new SimpleDateFormat("hh:mm a");
String shora = formatohora.format(hora);
tx_hora.setText(shora);

}

public void buscarProveedor() { // necesitamos este metodo para poder decidir a qué proveedor se le va ha enviar la orden de pedido.
String item = cb_buscarprovee.getSelectedItem().toString();
Proveedor pro;
try {
    if (tx_buscarprovee.getText().trim().equals("")) {
        JOptionPane.showMessageDialog(null, "Por favor digite un criterio de busqueda.");
    } else {
        if (item.equals("Código")) {
            pro = ControlProveedor.BuscarProveedor(tx_buscarprovee.getText());
        } else {
            if (item.equals("Cédula")) {
                pro = ControlProveedor.BuscarProveedorCed(tx_buscarprovee.getText());
            } else {
                pro = ControlProveedor.BuscarProveedorNom(tx_buscarprovee.getText());
            }
        }
        if (pro != null) {
            tx_codigoprovee.setText(pro.getCodigoProvee());
            tx_cedulaprovee.setText(pro.getCedula());
            tx_nombreprovee.setText(pro.getNombre());
            tx_direccionprovee.setText(pro.getDireccion());
            tx_telefonoprovee.setText(pro.getTelefono());
            tx_emailprovee.setText(pro.getEmail());
            tx_buscarprovee.setText("");
        } else {
            JOptionPane.showMessageDialog(null, "Proveedor no encontrado.");
        }
    }
} catch (SQLException ex) {
    Logger.getLogger(vistaOrdenPedido.class.getName()).log(Level.SEVERE, null, ex);
}
}

public void listarItemPedido() { // cada item que esté registrado a su vez va ha estar listado
                                 //en una tabla en el formulario de la orden.
        OrdenItem i = new OrdenItem();
        double acumulador = 0;
        double vr=0;
        double iva=0;
        double total=0;
        double cantpliegos=0;
        try {
            tablaItemOrden.setNumRows(0);
            ControlOrden_Item.listarItem();
            Iterator it = ControlOrden_Item.getItem().iterator();
            while (it.hasNext()) {
                i = (OrdenItem) it.next();
                if (i.getNumOrden().equals(tx_numero.getText())) {
                    Item itemcotizacion = ControlItem.BuscarItem(i.getNumItem());
                    cantpliegos = itemcotizacion.getCantidad() / itemcotizacion.getCortepapel().getCantidadPliego();
                    String vrtotal = Double.toString(itemcotizacion.getTipopapel().getValor() * cantpliegos);

                    vr = Double.parseDouble(vrtotal);
                    acumulador = acumulador + vr;
                    tx_subtotal.setText(Double.toString(acumulador));
                    iva = acumulador * 16 / 100;
                    tx_iva.setText(Double.toString(iva));
                    total = Double.parseDouble(tx_subtotal.getText()) + Double.parseDouble(tx_iva.getText());
                    tx_total.setText(Double.toString(total));

                    
                    String[] fila = {itemcotizacion.getNumero(), Double.toString(cantpliegos), itemcotizacion.getTipopapel().getNombre(), itemcotizacion.getCortepapel().getNombre(), Double.toString(itemcotizacion.getTipopapel().getValor()), vrtotal};
                    tablaItemOrden.addRow(fila);
                    guardar();
                    
                }

            }
        } catch (SQLException ex) {
            Logger.getLogger(vistaOrdenPedido.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(vistaOrdenPedido.class.getName()).log(Level.SEVERE, null, ex);
        }
    }


    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new vistaOrdenPedido().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Aceptar_eliminar;
    private javax.swing.JButton Cancelar_Eliminar;
    private javax.swing.JButton bt_Guardar;
    private javax.swing.JButton bt_agregar;
    private javax.swing.JButton bt_quitarItem;
    private javax.swing.JComboBox cb_buscarprovee;
    private javax.swing.JDialog dialogoOrden;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private jcMousePanel.jcMousePanel jcMousePanel1;
    private jcMousePanel.jcMousePanel jcMousePanel2;
    private jcMousePanel.jcMousePanel jcMousePanel3;
    private jcMousePanel.jcMousePanel jcMousePanel4;
    public static jcMousePanel.jcMousePanel pisoOrdenPedido;
    private javax.swing.JTable tablaordenpedido;
    private javax.swing.JTextField tx_buscarprovee;
    private javax.swing.JTextField tx_cedulaprovee;
    private javax.swing.JTextField tx_codigoprovee;
    private javax.swing.JTextField tx_direccionprovee;
    private javax.swing.JTextField tx_emailprovee;
    private javax.swing.JTextField tx_fecha;
    private javax.swing.JTextField tx_hora;
    private javax.swing.JTextField tx_iva;
    private javax.swing.JTextField tx_nombreprovee;
    private javax.swing.JTextField tx_numero;
    private javax.swing.JTextField tx_subtotal;
    private javax.swing.JTextField tx_telefonoprovee;
    private javax.swing.JTextField tx_total;
    // End of variables declaration//GEN-END:variables
}
